package o;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.os.Bundle;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.d;

@RestrictTo({d.ॱ})
public class ky extends Fragment {
    private e ˏ;

    interface e {
        void ˊ();

        void ˋ();

        void ˏ();
    }

    public static void ˋ(Activity activity) {
        FragmentManager fragmentManager = activity.getFragmentManager();
        if (fragmentManager.findFragmentByTag("androidx.lifecycle.LifecycleDispatcher.report_fragment_tag") == null) {
            fragmentManager.beginTransaction().add(new ky(), "androidx.lifecycle.LifecycleDispatcher.report_fragment_tag").commit();
            fragmentManager.executePendingTransactions();
        }
    }

    private void ॱ(e eVar) {
        if (eVar != null) {
            eVar.ˏ();
        }
    }

    private void ˊ(e eVar) {
        if (eVar != null) {
            eVar.ˊ();
        }
    }

    private void ˎ(e eVar) {
        if (eVar != null) {
            eVar.ˋ();
        }
    }

    public void onActivityCreated(Bundle bundle) {
        super.onActivityCreated(bundle);
        ॱ(this.ˏ);
        ˎ(o.kp.e.ON_CREATE);
    }

    public void onStart() {
        super.onStart();
        ˊ(this.ˏ);
        ˎ(o.kp.e.ON_START);
    }

    public void onResume() {
        super.onResume();
        ˎ(this.ˏ);
        ˎ(o.kp.e.ON_RESUME);
    }

    public void onPause() {
        super.onPause();
        ˎ(o.kp.e.ON_PAUSE);
    }

    public void onStop() {
        super.onStop();
        ˎ(o.kp.e.ON_STOP);
    }

    public void onDestroy() {
        super.onDestroy();
        ˎ(o.kp.e.ON_DESTROY);
        this.ˏ = null;
    }

    private void ˎ(o.kp.e eVar) {
        Activity activity = getActivity();
        if (activity instanceof kw) {
            ((kw) activity).ˏ().ˊ(eVar);
        } else if (activity instanceof kv) {
            kp ac_ = ((kv) activity).ac_();
            if (ac_ instanceof kx) {
                ((kx) ac_).ˊ(eVar);
            }
        }
    }
}
